﻿/*
    You are given n integers (given in a single line, separated by a space).
    Write a program that checks whether the product of the odd elements is equal to the product of the even elements.
    Elements are counted from 1 to n, so the first element is odd, the second is even, etc.
 */

using System;
using System.Linq;
class OddAndEvenProduct
{
    static void Main()
    {
        int oddProduct = 1;
        int evenProduct = 1;
        int[] number = Console.ReadLine()
            .Split(new char[] { ' ', ',', '\t' }, StringSplitOptions.RemoveEmptyEntries)
            .Select(x => int.Parse(x))
            .ToArray();

        for (int i = 0; i < number.Length; i++)
        {
            if (i % 2 == 0)
            {
                oddProduct *= number[i];
            }
            if (i % 2 != 0)
            {
                evenProduct *= number[i];
            }
        }
        Console.WriteLine((oddProduct == evenProduct) ? "Yes" : "No");
        Console.WriteLine("odd product is = {0}", oddProduct);
        Console.WriteLine("odd product is = {0}", evenProduct);
    }

}
